/**
 * Created by jfgao on 2017/4/1.
 */
angular.module('Portal').controller('PageController',['SignSwitch','$location','$scope','$cookies',function (SignSwitch, $location, $scope,$cookies) {
  $scope.flag=SignSwitch.signSwitch;


  if (!SignSwitch.signSwitch ) {
    $scope.pageFlag=true;
  }
  if($scope.pageFlag){
    if($cookies.get("token") !== undefined){
      // $location.path("/cp");
      window.location.href="/cp"
    }else{
      $location.path("/signins");

    }
  }else{
    $location.path("/");

  }
}]);